/**
 * =====================================================================================
 *       @file  ngx_os.h
 *      @brief  
 *
 *  Detailed description starts here.
 *
 *   @internal
 *     Created  2012年05月15日 12时17分09秒 
 *    Revision  1.0.0.0
 *    Compiler  gcc/g++
 *
 *     @author  luis
 * =====================================================================================
 */

#ifndef _H_NGX_OS_H_INCLUDED_
#define _H_NGX_OS_H_INCLUDED_

typedef ssize_t (*ngx_recv_pt)(ngx_connection_t *c, u_char *buf, size_t size);
typedef ssize_t (*ngx_recv_chain_pt)(ngx_connection_t *c, ngx_chain_t *in);
typedef ssize_t (*ngx_send_pt)(ngx_connection_t *c, u_char *buf, size_t size);
typedef ssize_t (*ngx_send_chain_pt)(ngx_connection_t *c, ngx_chain_t *in, off_t limit);

typedef struct
{
    ngx_recv_pt         recv;
    ngx_recv_chain_pt   recv_chain;
    ngx_recv_pt         udp_recv;
    ngx_send_pt         send;
    ngx_send_chain_pt   send_chain;
    ngx_uint_t          flags;
} ngx_os_io_t;

ssize_t ngx_unix_recv(ngx_connection_t *c, u_char *buf, size_t size);


#endif
